package com.example.demo.bizhan.thread;

import static java.lang.System.out;

/**
 * @description: xxx
 * @time: 2020/10/27 17:47
 * @author: baojinlong
 **/
public class ThreadDemo01 {
    public static void main(String[] args) {
        out.println(Thread.currentThread().getName());
        Thread01 thread01 = new Thread01();
        Thread01 thread02 = new Thread01();
        // 启动线程
        thread01.start();
        thread02.start();
    }

}

class Thread01 extends Thread {
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            out.println(Thread.currentThread().getName());
        }
    }
}


class Thread02 extends Thread {
    @Override
    public void run() {
        for (int i = 0; i < 233; i++) {
            out.println(Thread.currentThread().getName());
        }
    }
}

